package com.qy.util;
  

  
public class WeiXinContants {  
  
    /**
     * 基础信息
     */
    public static final String country = "country";
    public static final String province = "province";
    public static final String city = "city";
    public static final String nickname = "nickname";
    public static final String headimgurl = "headimgurl";
    public static final String sex = "sex";
    //accessToken值，2个小时刷新一次
    public static final String accessToken = "accessToken";
    
    /**
     * 是否更新菜单
     */
    public static boolean is_refresh_menu = true;
    /**
     * 是否刷新token
     */
    public static boolean is_refresh_access_token = true;
    /**
     * 获取token值
     */
    public static String access_token_key = "access_token_value";
    
	public static String getAccess_token_value(String appid) {
		return (String) RedisPoolMgr.get(access_token_key+StaticData.first_split+appid, String.class);
	}
	
	public static void setAccessTokenValue(String appid,String accessTokenValue) {
		RedisPoolMgr.set(access_token_key+StaticData.first_split+appid, accessTokenValue, 7000);
	}
	
    /**
     * 获取jsapi_ticket_key值
     */
    public static String jsapi_ticket_key = "jsapi_ticket";
	public static String getJsapiTicket() {
		return (String) RedisPoolMgr.get(jsapi_ticket_key, String.class);
	}

	public static void setJsapiTicket(String jsapiTicket) {
		RedisPoolMgr.set(jsapi_ticket_key, jsapiTicket, 7000);
	}
	
}  